/*
 * @Description: teacher
 * @Author: rendc
 * @Date: 2023-11-19 14:22:31
 * @LastEditors: rendc
 * @LastEditTime: 2023-11-19 14:40:43
 */
class Teacher {
  // 成员变量 用private去修饰数据成员
  private String id;
  private String name;
  private double salary;
  // 无参构造器
  public Teacher(){
    // 无参构造器
    // System.out.println("Teacher-无参构造器");
  }
  // 有参构造器 方法
  public Teacher(String id,String name){
    // 有参构造器
    System.out.println("Teacher-两参构造器");
    this.id = id;
    this.name = name;
  }
  // 有参构造器 方法
  public Teacher(String id,String name,double salary){
    // 有参构造器
    System.out.println("Teacher-全参构造器");
    this.id = id;
    this.name = name;
    this.salary = salary;
  }
  // 成员方法
  public void setId(String id) {
    this.id = id.trim();
  }
  public String getId() { 
    return id; 
  }
  public void setSalary(double salary){
    this.salary = salary;
  }
  public double getSalary  (){
    return salary;
  }
  public void setName(String name){
    this.name = name;
  }
  public String getName  (){
    return name;
  }
  public void sayHello(){
    System.out.println("Teacher: " + this.id+"；姓名：" + this.name+"；工资：" + this.salary);
  }
}